﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Linq.Expressions;

namespace JackyCode.Mock
{
    class SetUpImpl<TEntity,TResult> : ISetUp<TResult>
    {
        private Expression<Func<TEntity, TResult>> expression;

        public SetUpImpl(Expression<Func<TEntity, TResult>> expression)
        {
            this.expression = expression;
        }

        public MethodInfo GetMethodInfo()
        {
            MethodCallExpression methodCallExpression = expression.Body as MethodCallExpression;
            return methodCallExpression.Method;
        }
    }
}
